package com.flyco.modules.oss.service;

import java.io.IOException;

import com.baomidou.mybatisplus.extension.service.IService;
import com.flyco.modules.oss.entity.OSSFile;
import com.flyco.modules.oss.vo.OssCallbackResult;
import com.flyco.modules.oss.vo.OssPolicyResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

public interface IOSSFileService extends IService<OSSFile> {

	void upload(MultipartFile multipartFile) throws IOException;

	void uploadByDir(MultipartFile multipartFile, String dir) throws IOException;

	boolean delete(OSSFile ossFile);

	/**
	 * oss上传策略生成
	 * @param bizType 业务类型
	 */
	OssPolicyResult policy(String bizType);
	/**
	 * oss上传成功回调
	 */
	OssCallbackResult callback(HttpServletRequest request);

}
